<%@ page language="java" contentType="text/html; charset=UTF-8"
	 pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
	String path = request.getContextPath() + "/";
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>角色管理</title>
<meta
	content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no'
	name='viewport'>
<!-- bootstrap 3.0.2 -->
<link href="<%=path%>bootstrap/css/bootstrap.min.css" rel="stylesheet"
	type="text/css" />
<!-- font Awesome -->
<link href="<%=path%>bootstrap/css/font-awesome.min.css"
	rel="stylesheet" type="text/css" />
<!-- Ionicons -->
<link href="<%=path%>bootstrap/css/ionicons.min.css" rel="stylesheet"
	type="text/css" />
<!-- DATA TABLES -->

<!-- Theme style -->

<link href="<%=path%>bootstrap/css/bootstrap.min.css" rel="stylesheet"
	type="text/css" />
<link rel="stylesheet" type="text/css"
	href="<%=path%>css/jquery.dataTables.min.css">
<link type="text/css" rel="stylesheet"
	href="<%=path%>css/dataTables.tableTools.css" />
<link type="text/css" rel="stylesheet"
	href="<%=path%>css/dataTables.bootstrap.css" />
<link href="<%=path%>bootstrap/css/AdminLTE.css" rel="stylesheet"
	type="text/css" />


<script type="text/javascript" src="<%=path%>js/jquery.js"></script>
<script type="text/javascript"
	src="<%=path%>js/jquery.dataTables.min.js"></script>
<script src="<%=path%>js/bootstrap.min.js" type="text/javascript"></script>
<script src="<%=path%>js/syrole.js" type="text/javascript"></script>

</head>
<body class="skin-blue">
  <%@include file="../header.jsp"%> <!--静态包含-->
  <%@include file="../left.jsp"%> <!--静态包含-->


	<!-- Right side column. Contains the navbar and content of the page -->
	<aside class="right-side"> <!-- Content Header (Page header) -->
	<section class="content-header">
	<h1>
		权限 管理 <small>角色 管理</small>
	</h1>
	</section><section class="content">
	<div class="row">
		<div class="col-xs-12">


			<div class="box">
				<div class="box-header">

					<form action="pageView.action" id="regForm">
						角色:<input class="tablesrk" id="sse.enterpriseName"
							value="${page.param.pageName}" type="text" name="pageName"
							placeholder="请输入"> <input class="tablesrk" id="pageNowid"
							value="${page.pageNow}" type="hidden" name="pageNow"> <input
							class="btn_blue w90" type="button" value="搜索" onclick="jump(1)">

					</form>
				</div>
				<!-- /.box-header -->

				<!-- <input type="button" value="新增" onclick="new()"> -->
				<div class="box-body table-responsive">
					<table id="example1" class="table table-bordered table-striped">
						<thead>
							<tr>
								<th><input type="checkbox" name="allChecked" /></th>
								<th>id</th>
								<th>身份</th>
								<th>描述</th>
								<th>操作</th>
							</tr>
						</thead>
					</table>
				</div>
			</div>
		</div>
	</div>




	</section><!-- /.content --> </aside>
	<!-- /.right-side -->
	</div>
	<!-- ./wrapper -->





	<!--单个删除确认对话框-->
	<div class="modal fade" id="deleteOneModal" tabindex="-1" role="dialog"
		aria-labelledby="myModalLabel" aria-hidden="true">
		<!-- data-backdrop="static" 禁止点击弹框后面内容 -->
		<form class="form-horizontal" role="form">
			<div class="modal-dialog modal-sm ">
				<!-- modal-sm 小的  modal-lg 大的 -->
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"
							aria-hidden="true">&times;</button>
						<h4 class="modal-title" id="myModalLabel">提示信息</h4>
					</div>
					<div class="modal-body" style="text-align: left;">
						<h5>您确定要删除当前信息吗？</h5>
					</div>
					<div class="modal-footer">
						<!-- 
                    <button type="button" class="btn btn-default"
                            data-dismiss="modal">取消
                    </button>
                     -->
						<button type="button" class="btn btn-primary" id="delSubmit">
							确认</button>
					</div>
				</div>
				<!-- /.modal-content -->
			</div>
		</form>
	</div>


	<!--多个删除确认对话框-->
	<div class="modal fade" id="deleteAllModal" tabindex="-1" role="dialog"
		aria-labelledby="myModalLabel" aria-hidden="true">
		<form class="form-horizontal" role="form">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"
							aria-hidden="true">&times;</button>
						<h4 class="modal-title" id="myModalLabel">提示信息</h4>
					</div>
					<div class="modal-body" style="text-align: left;">
						<h5>您确定要删除选中信息吗？</h5>
					</div>
					<div class="modal-footer">
						<!-- 
                    <button type="button" class="btn btn-default"
                            data-dismiss="modal">取消
                    </button>
                     -->
						<button type="button" class="btn btn-primary" id="delAllSubmit">
							确认</button>
					</div>
				</div>
				<!-- /.modal-content -->
			</div>
		</form>
	</div>



	<!--新增页面开始-->
	<div class="modal fade" id="myModal-add-info" tabindex="-1"
		role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="myModalLabel">新 增</h4>
				</div>
				<form class="form-horizontal" role="form" action="" method="post"
					id="category_add">
					<div class="modal-body">
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">角色名称：
							</label>

							<div class="col-sm-9">
								<input type="text" class="form-control" id="rolenameid"
									name="rolename" style="width: 250px" maxlength="15"
									placeholder="10个汉字以内" />

							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">角色描述：
							</label>

							<div class="col-sm-9">
								<input type="text" class=" sortNumber form-control"
									name="roledetail" id="roledetailid" style="width: 250px"
									maxlength="3" />
							</div>
						</div>

					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">关闭
						</button>
						<button type="button" class="btn btn-primary" id="btnsubmit"
							onclick="syroleadd()">提交</button>
					</div>
				</form>
			</div>
			<!-- /.modal-content -->
		</div>
	</div>




	<!--修改页面开始-->
	<div class="modal fade" id="myModal-update-info" tabindex="-1"
		role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="myModalLabel">修 改</h4>
				</div>
				<form class="form-horizontal" role="form" action="" method="post"
					id="category_add">
					<div class="modal-body">
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">酒名称：
							</label>

							<div class="col-sm-9">
								<input type="text" class="form-control" id="updaterolenameid"
									name="rolename" style="width: 250px" maxlength="15"
									placeholder="10个汉字以内" />

							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">酒描述：
							</label>

							<div class="col-sm-9">
								<input type="text" class=" sortNumber form-control"
									name="roledetail" id="updateroledetailid"
									style="width: 250px" maxlength="3" /> <input type="hidden"
									class="form-control" id="updateid" name="id"
									style="width: 250px" maxlength="15" placeholder="10个汉字以内" />
							</div>
						</div>

					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">关闭
						</button>
						<button type="button" class="btn btn-primary" id="btnsubmit"
							onclick="syroleupdata()">提交</button>
					</div>
				</form>
			</div>
			<!-- /.modal-content -->
		</div>
	</div>
	
	
	<!-- 给角色添加权限 -->
	<div class="modal fade" id="myModal-addauthority-info" tabindex="-1"
		role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="myModalLabel">添加权限</h4>
				<div class="box-body table-responsive" >
					<form action="" method="post">
					<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">角色编号：
							</label>

							<div class="col-sm-9">
								<input type="text" class=" sortNumber form-control"
									name="roleid" id="roleid" style="width: 250px"
									maxlength="30" />
							</div>
				   </div>
		           <div class="form-group">
						<label class="col-sm-3 control-label no-padding-right">权限名称：
						</label>

							<div class="col-sm-9">
								<c:forEach items="${sessionScope.authlist }" var="auth">
						<input type="checkbox" value="${auth.id}" name="authid"
									id="authid">${auth.name}						
						</c:forEach>
							</div>
				  </div>
						
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">关闭
						</button>
						<button type="button" class="btn btn-primary" id="btnsubmit"
							onclick="userAddAuthority()">提交</button>
					</div>
					</form>
				
				</div>
				</div>



			</div>
			<!-- /.modal-content -->
		</div>
	</div>
	

</body>
</html>